#pragma once
//============================================================================
// Copyright (C) 2009-2013 Brett R. Jones 
// All Rights Reserved
//
// You may redistribute and/or modify for non commercial and commercial uses 
// provided this copyright notice remains in place and is not modified
//
// This code is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// brettjones1900@gmail.com
// http://www.p2panarchy.com
//============================================================================

class VxSktConnect;

// implements a manager to manage connect sockets
class VxSktConnectMgr : public VxSktBaseMgr
{
public:
	//=== constructor ===//
	VxSktConnectMgr();
	//=== destructor ===//
	virtual ~VxSktConnectMgr();

	//! make a new socket... give derived classes a chance to override
	virtual VxSktBase *		MakeNewSkt( void );

	//! Connect to ip or url and return socket.. if cannot connect return NULL
	virtual VxSktConnect *	ConnectTo(	const char * pIpOrUrl,				// remote ip or url 
										U16			 u16Port,				// port to connect to
										int			 iTimeoutSeconds = 10);	// seconds before connect attempt times out
	
	//=== functions that should only be called by derived classes ===//
	//! handle callbacks from sockets
	//virtual	void			DoRecieveCallback( VxSktBase * poSkt );

protected:

	//=== vars ===//

};

